<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/TR/REC-html40" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"><head>



<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="ProgId" content="Word.Document">
<meta name="Generator" content="Microsoft Word 9">
<meta name="Originator" content="Microsoft Word 9">
<link rel="File-List" href="http://online-judge.uva.es/p/v101/p0_files/filelist.xml">
<link rel="Edit-Time-Data" href="http://online-judge.uva.es/p/v101/p0_files/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Problem A - 2001 Regionals Warmup Contest.</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Shahriar Manzoor</o:Author>
  <o:LastAuthor>Administrator</o:LastAuthor>
  <o:Revision>61</o:Revision>
  <o:TotalTime>157</o:TotalTime>
  <o:LastPrinted>1999-05-07T21:27:00Z</o:LastPrinted>
  <o:Created>2000-12-04T12:45:00Z</o:Created>
  <o:LastSaved>2001-08-29T01:00:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>201</o:Words>
  <o:Characters>1150</o:Characters>
  <o:Company>CSE, BUET</o:Company>
  <o:Lines>9</o:Lines>
  <o:Paragraphs>2</o:Paragraphs>
  <o:CharactersWithSpaces>1412</o:CharactersWithSpaces>
  <o:Version>9.2720</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
  <w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery>
  <w:UseMarginsForDrawingGridOrigin/>
  <w:Compatibility>
   <w:FootnoteLayoutLikeWW8/>
   <w:ShapeLayoutLikeWW8/>
   <w:AlignTablesRowByRow/>
   <w:ForgetLastTabAlignment/>
   <w:LayoutRawTableWidth/>
   <w:LayoutTableRowsApart/>
  </w:Compatibility>
 </w:WordDocument>
</xml><![endif]-->
<style>
<!--
 /* Font Definitions */
@font-face
	{font-family:Courier;
	panose-1:0 0 0 0 0 0 0 0 0 0;
	mso-font-alt:"Courier New";
	mso-font-charset:0;
	mso-generic-font-family:modern;
	mso-font-format:other;
	mso-font-pitch:fixed;
	mso-font-signature:3 0 0 0 1 0;}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
h1
	{mso-style-next:Normal;
	margin:0in;
	margin-bottom:.0001pt;
	text-align:justify;
	mso-pagination:widow-orphan;
	page-break-after:avoid;
	mso-outline-level:1;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Times New Roman";
	color:black;
	mso-font-kerning:0pt;
	font-weight:normal;
	font-style:italic;}
p.MsoTitle, li.MsoTitle, div.MsoTitle
	{margin:0in;
	margin-bottom:.0001pt;
	text-align:center;
	mso-pagination:widow-orphan;
	font-size:18.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;
	font-weight:bold;
	mso-bidi-font-weight:normal;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
	{margin:0in;
	margin-bottom:.0001pt;
	text-align:center;
	mso-pagination:widow-orphan;
	font-size:24.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;
	font-weight:bold;}
p.MsoBodyText2, li.MsoBodyText2, div.MsoBodyText2
	{margin:0in;
	margin-bottom:.0001pt;
	text-align:justify;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;
	mso-bidi-font-weight:bold;}
p.MsoBodyText3, li.MsoBodyText3, div.MsoBodyText3
	{margin:0in;
	margin-bottom:.0001pt;
	text-align:center;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	mso-bidi-font-size:10.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
em
	{mso-bidi-font-style:normal;}
p.Preformatted, li.Preformatted, div.Preformatted
	{mso-style-name:Preformatted;
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:none;
	tab-stops:0in 47.95pt 95.9pt 143.85pt 191.8pt 239.75pt 287.7pt 335.65pt 383.6pt 431.55pt 479.5pt;
	layout-grid-mode:char;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-font-family:"Times New Roman";
	mso-bidi-font-family:"Times New Roman";}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head><body style="" lang="EN-US">

<div class="Section1">

<p class="MsoTitle">Problem A</p>

<p class="MsoSubtitle">Summation of Four Primes<span style=""><o:p></o:p></span></p>

<p class="MsoNormal" style="text-align: center;" align="center"><b><span style="">Input: </span></b><span style="">standard input<o:p></o:p></span></p>

<p class="MsoNormal" style="text-align: center;" align="center"><b><span style="">Output: </span></b><span style="">standard output<o:p></o:p></span></p>

<p class="MsoNormal" style="text-align: center;" align="center"><b><span style="">Time Limit:</span></b><span style=""> 4 seconds<o:p></o:p></span></p>

<p class="MsoNormal" style="text-align: justify;"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>

<p class="MsoNormal" style="text-align: justify;">Euler proved in one of his
classic theorems that prime numbers are infinite in number. But can every
number be expressed as a summation of four positive primes? I don&#8217;t know the
answer. May be you can help!!! I want your solution to be very efficient as I
have a 386 machine at home. But the time limit specified above is for a Pentium
III 800 machine. The definition of prime number for this problem is &#8220;A prime
number is a positive number which has exactly two distinct integer factors&#8221;. As
for example 37 is prime as it has exactly two distinct integer factors 37 and
1.</p>

<p class="MsoNormal" style="text-align: justify;"><b style=""><span style="font-size: 10pt;"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></span></b></p>

<p class="MsoNormal" style="text-align: justify;"><b style=""><span style="font-size: 18pt;">Input</span></b></p>

<p class="MsoNormal" style="text-align: justify;">The input contains one integer
number <b>N</b> <b>(N&lt;=10000000)</b> in every line. This is the number you
will have to express as a summation of four primes. Input is terminated by end
of file.</p>

<p class="MsoNormal" style="text-align: justify;"><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></p>

<p class="MsoNormal" style="text-align: justify;"><b style=""><span style="font-size: 18pt;">Output</span></b></p>

<p class="MsoBodyText2">For each line of input there is one line of output, which
contains four prime numbers according to the given condition. If the number
cannot be expressed as a summation of four prime numbers print the line <b style="">&#8220;Impossible.&#8221;</b> in a single line. There
can be multiple solutions. Any good solution will be accepted.</p>

<p class="MsoNormal" style="text-align: justify;"><b style=""><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></b></p>

<p class="MsoNormal" style="text-align: justify;"><b style=""><span style="font-size: 18pt;">Sample Input:</span></b></p>

<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-family: Courier; color: windowtext;">24<br>
36<br>
46<o:p></o:p></span></p>

<p class="MsoNormal" style="text-align: justify;"><b><span style=""><!--[if !supportEmptyParas]-->&nbsp;<!--[endif]--><o:p></o:p></span></b></p>

<p class="MsoNormal" style="text-align: justify;"><b><span style="font-size: 18pt;">Sample
Output:</span></b></p>

<p class="MsoNormal"><span style="font-family: Courier; color: windowtext;">3 11 3 7<br>
3 7 13 13<br>
11 11 17 7<o:p></o:p></span></p>


<div class="MsoNormal" style="text-align: center;" align="center"><span style="font-family: Courier; color: windowtext;">

<hr size="2" width="100%" align="center">

</span></div>


<p class="MsoNormal"><b><span style="color: windowtext;">Shahriar
Manzoor</span></b><span style="color: windowtext;"><br style="">
<!--[if !supportLineBreakNewLine]--><br style="">
<!--[endif]--><o:p></o:p></span></p>

<p class="MsoBodyText3">&#8220;You can fool some people all the time, all the people
some of the </p>

<p class="MsoBodyText3">time but you cannot fool all the people all the time.&#8221;</p>

</div>

</body></html>